﻿
Partial Class Admin_ParticipantFormMaker
    Inherits System.Web.UI.Page

    Protected Sub CreateFormButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateFormButton.Click
        Dim fileName As String = Server.MapPath(System.Web.Configuration.WebConfigurationManager.AppSettings("ParticipantDocumentFileName"))
        Dim imageName As String = ""
        Dim applicationName As String = Application("AppName")
        Dim deptName As String = Application("StateDeptName")
        If Not Application("CurrentLogo") Is Nothing Then
            imageName = Server.MapPath(Application("CurrentLogo"))
        End If
        Dim pfm As New Spreadsheet.ParticipantFormMaker()
        pfm.CreateNewForm(fileName, applicationName, imageName, deptName)
        Me.FormCreatedLabel.Visible = True
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.FormCreatedLabel.Visible = False
        Dim fileName As String = System.Web.Configuration.WebConfigurationManager.AppSettings("ParticipantDocumentFileName")
        Me.ViewFormHyperLink.NavigateUrl = fileName
    End Sub
End Class
